<form name="contract_form" class="ui-dialog-content" style="width: 800px;">
    <table width="100%">
        <tbody>
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top">
                    <em class="c-red">*</em>合同编号
                </td>
                <td class="pt12" valign="top">
                    <input select2  id="contract_code" name="contract_code" ng-model="data.item.contract_code" select2-model="ddlSeletedContract"
                           config="data.ddlConfigContract" class="form-control" required maxlength="50"  type="text"/>
                    <p role="alert"
                       ng-show="(contract_form.contract_code.$touched || contract_form.$submitted) && contract_form.contract_code.$error.required"
                       class="error ng-hide c-red lh30">
                        合同编号不能为空</p>

                </td>
            </tr>            
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top">
                    <em class="c-red">*</em> 违规责任人
                </td>
                <td class="pt12" valign="top">
                    <input select2  id="violated_principal" name="violated_principal" data-ng-model="data.item.violated_principal" select2-model="ddl2Principal"
                           config="data.ddlConfigPrincipal" class="form-control" required/>
                    <p role="alert"
                       ng-show="(contract_form.violated_principal.$touched || contract_form.$submitted) && contract_form.violated_principal.$error.required"
                       class="error ng-hide c-red lh30">
                        违规责任人不能为空</p>
                </td>            
            </tr>
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top"><em class="c-red">*</em>违规大类</td>
                <td class="pt12" valign="top">
                    <div ui-combobox data="data.categoryList" text-field="category_name" value-field="violated_category_id" 
                         ng-model="data.item.violated_category_id" changed="data.changeCategory(data)"></div>
                    <input id="violated_category_id_temp"  name="violated_category_id_temp" data-ng-model="data.item.violated_category_id_temp" required style="display: none"/>
                    <span role="alert"
                          ng-show="(contract_form.$submitted || contract_form.violated_category_id_temp.$touched) && contract_form.violated_category_id_temp.$error.required"
                          class="error ng-hide c-red lh30">违规大类不能为空</span>                  
                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top"><em class="c-red">*</em>违规小类</td>
                <td class="pt12 w275" valign="top">
                    <div ui-combobox data="data.littlerCategoryList" text-field="littler_category_name" value-field="violated_littler_category_id" required name="violated_littler_category_id"
                         ng-model="data.item.violated_littler_category_id" changed="data.changeLittlerCategory(data)"></div>
                    <input id="violated_littler_category_id_temp"  name="violated_littler_category_id_temp" data-ng-model="data.item.violated_littler_category_id_temp" style="display: none"/>
                    <span role="alert"
                          ng-show="(contract_form.$submitted || contract_form.violated_littler_category_id.$touched) && contract_form.violated_littler_category_id.$error.required"
                          class="error ng-hide c-red lh30">违规小类不能为空</span>                   
                </td>
            </tr>        
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top"><em class="c-red">*</em>违规内容</td>
                <td class="pt12">
                    <textarea name="violated_content" data-ng-model="data.item.violated_content" class="textarea" maxlength="500" required> </textarea>
                    <p role="alert"
                       ng-show="(contract_form.violated_content.$touched || contract_form.$submitted) && contract_form.violated_content.$error.required"
                       class="error ng-hide c-red lh30">
                        违规内容不能为空</p>                    
                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top">
                    审批人
                </td>
                <td class="pt12" valign="top">                    
                    <input select2  id="approver"  name="approver" data-ng-model="data.item.approver" select2-model="ddl2Approver"
                           config="data.ddlConfigApprover" class="form-control"/>
                </td>
            </tr>            
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top">审批意见</td>
                <td class="pt12"><textarea id="approve_comment" name="approve_comment" data-ng-model="data.item.approve_comment" class="textarea" maxlength="500"> </textarea></td>
            </tr>
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top">变通方案</td>
                <td class="pt12"><textarea id="alternative_solution" name="alternative_solution" data-ng-model="data.item.alternative_solution" class="textarea"  maxlength="500"> </textarea></td>
            </tr>
            <tr>
                <td align="right" class="form-cell w60 pt16" valign="top">附件</td>
                <td class="pt12">
                    <div id="fileupload" class="fileinput-button btn">
                        <span class="f13">上传附件</span>
                        <input type="file" name="file" />                        
                    </div>
                    <div class="c-red f13" style="clear:both;display: none" id="fileupload_error">上传失败</div>                    
                    <input type="hidden" id="fileupload_url" value="{{data.attachmentList}}" />
                    <div>
                        <div style="line-height: 28px;height: 28px;display: inline-block;margin-right: 20px" ng-repeat="file in data.attachmentList">
                            <a target="_blank" href="{{ file.document_path}}">{{ file.document_name}}</a>
                            <a class="glyphicon glyphicon-trash" title="删除附件" href="javascript: void(0)" ng-click="data.delAttachment(data,file.document_id)"></a>
                        </div>                        
                    </div>

                </td>
            </tr>
        </tbody>
    </table>
</form>